﻿----------------------------------------------
-- dbo.CatTabla
----------------------------------------------
IF NOT EXISTS( SELECT 1 FROM dbo.CatTabla WHERE IdTabla = 1 ) INSERT INTO dbo.CatTabla(IdTabla,Nombre) VALUES(1,'CatDoctor')
IF NOT EXISTS( SELECT 1 FROM dbo.CatTabla WHERE IdTabla = 2 ) INSERT INTO dbo.CatTabla(IdTabla,Nombre) VALUES(2,'CatUsuario')
IF NOT EXISTS( SELECT 1 FROM dbo.CatTabla WHERE IdTabla = 3 ) INSERT INTO dbo.CatTabla(IdTabla,Nombre) VALUES(3,'CatEstudio')
IF NOT EXISTS( SELECT 1 FROM dbo.CatTabla WHERE IdTabla = 4 ) INSERT INTO dbo.CatTabla(IdTabla,Nombre) VALUES(4,'CatProcedencia')


----------------------------------------------
-- dbo.Folio
----------------------------------------------
IF NOT EXISTS( SELECT 1 FROM dbo.Folio WHERE IdFolio = 1 ) INSERT INTO dbo.Folio(IdFolio,IdTabla,Folio) VALUES(1,1,0)
IF NOT EXISTS( SELECT 1 FROM dbo.Folio WHERE IdFolio = 2 ) INSERT INTO dbo.Folio(IdFolio,IdTabla,Folio) VALUES(2,2,0)
IF NOT EXISTS( SELECT 1 FROM dbo.Folio WHERE IdFolio = 3 ) INSERT INTO dbo.Folio(IdFolio,IdTabla,Folio) VALUES(3,3,0)
IF NOT EXISTS( SELECT 1 FROM dbo.Folio WHERE IdFolio = 4 ) INSERT INTO dbo.Folio(IdFolio,IdTabla,Folio) VALUES(4,4,0)
